#include <bits/stdc++.h>
using namespace std;
const int maxn=100000+10;
int n,m,l,V,cnt[30],ans[30];
double d[maxn],v[maxn],a[maxn],mm[maxn]; 
int cf[15],zs[15];
struct jhg{
        int num,bh;
}sl[maxn];
jhg sll[maxn];
int nk[maxn][maxn],cs[maxn][maxn];
int div(double bz)
{
        int rr=m,ll=1;
        while(ll<rr)
        {
                int mid=(ll+rr)>>1;
                if(mm[mid]<bz)
                {
                        ll=mid+1;
                }
                else{
                        rr=mid;
                }
        }
        return ll;
}
bool cmp1(jhg a,jhg b)
{
        return a.num>b.num;
}
bool cmp2(jhg a,jhg b)
{
        return a.bh<b.bh;
}
int main(){
        freopen("detect.in","r",stdin);
        freopen("detect.out","w",stdout);
        cin>>n>>m>>l>>V;
        for(int i=1;i<=n;i++)
        {
                cin>>d[i]>>v[i]>>a[i];
        }
        for(int i=1;i<=m;i++)
        {
                cin>>mm[i];
        }
       
       for(int i=1;i<=n;i++)
       {
               if(v[i]<=V && a[i]<=0)
               {
                                        
                       continue;
               }
                else {
                        if(a[i]==0)
                        {       
                                int ll=div(d[i]);
                                int rr=div(l);
                                if(rr-ll>=0){
                                for(int j=ll;j<=rr;j++)
                                {
                                        sl[j].bh=j;
                                        sll[i].bh=j;
                                        sl[j].num+=1;
                                        sll[i].num+=1;
                                        nk[j][sl[j].num]=i;
                                        cs[i][sll[i].num]=j;
                                }
                                cnt[1]++;
                                }
                                
                                

                        }
                        else{
                                if(a[i]<=0)
                        {
                                double s=(v[i]*v[i]-(V*V))/(2*(-1)*a[i]);
                                if(d[i]+s>=l)
                                {
                                        int ll,rr;
                                        ll=div(d[i])+1;
                                        rr=div(l);
                                        if(rr-ll>=0){
                                for(int j=ll;j<=rr;j++)
                                {
                                        sl[j].bh=j;
                                        sll[i].bh=j;
                                        sl[j].num+=1;
                                        sll[i].num+=1;
                                        nk[j][sl[j].num]=i;
                                        cs[i][sll[i].num]=j;
                                }
                                cnt[1]++;
                                }
                                }
                                else{
                                        int ll,rr;
                                        ll=div(d[i])+1;
                                        rr=div(d[i]+s);
                                        if(rr-ll>=0){
                                for(int j=ll;j<=rr;j++)
                                {
                                        sl[j].bh=j;
                                        sll[i].bh=j;
                                        sl[j].num+=1;
                                        sll[i].num+=1;
                                        nk[j][sl[j].num]=i;
                                        cs[i][sll[i].num]=j;
                                }
                                cnt[1]++;
                                }
                                }

                               }
                         else{
                                double s=((V*V)-v[i]*v[i])/(2*a[i]);
                               if(d[i]+s>l)
                               {
                                       continue;
                               }
                               else{
                                       int ll,rr;
                                       ll=div(d[i]+s);
                                       rr=div(l);
                                       if(rr-ll>=0){
                                for(int j=ll;j<=rr;j++)
                                {
                                        sl[j].bh=j;
                                        sll[i].bh=j;
                                        sl[j].num+=1;
                                        sll[i].num+=1;
                                        nk[j][sl[j].num]=i;
                                        cs[i][sll[i].num]=j;
                                }
                                cnt[1]++;
                                }
                                       
                               }

                               }}
                       }
               }
              
       cout<<cnt[1]<<endl;
        return 0;
}
